﻿<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages.Administration, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" MasterPageFile="~/_admin/admin.master" %>

<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="Microsoft.SharePoint.Administration" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Reflection" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="Microsoft.SharePoint.Administration" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.IO" %>

<script runat="server">
    const string MOD_PROP = "<a onmouseover=\"this.style.cursor='hand';\" title='Edit {0}'  onclick=\"javascript:window.showModalDialog('ModifyArrowSetting.aspx?mode={1}','','dialogWidth=400px;dialogHeight=450px;center=yes;help=no;scroll=no;status=no;');window.location.reload();\"><img src='../_layouts/images/EDITITEM.GIF' border='0' alt='Edit {0}' ></a>";
    const string MODE_LIC = "lic";
    const string ARROW_LIC_PROP = "WindwardArrowLicense";
    
    protected void Page_Load(object sender, EventArgs e)
    {
        // Load license
        licenseLabel.Text = getArrowLicense();

        // Create edit link
        licenseLink.Text = String.Format(MOD_PROP, "License", MODE_LIC);
    }

    protected string getArrowLicense()
    {
        return (string)SPFarm.Local.Properties[ARROW_LIC_PROP];
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    Use this page to set the license key for Windward Arrow.
    <hr style="height: 1px; width: 100%; color: Gray" />
    <div>
        <table>
            <tr>
                <td class="ms-descriptiontext ms-inputformdescription" style="width: 100px">
                    License:
                </td>
                <td>
                    <asp:Label ID="licenseLabel" runat="server" CssClass="ms-descriptiontext ms-inputformdescription"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="licenseLink" runat="server" Text=""></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    Windward Arrow License Settings
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    Windward Arrow License Settings
</asp:Content>
